<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

Class Access_Registry {

        private $vars = array();
        
        
        function set($key, $var) 
        {

            if (isset($this->vars[$key])) {

                throw new Exception('Unable to set var `' . $key . '`. Already set.');

        }


            $this->vars[$key] = $var;

            return true;

        }


        function get($key) 
        {

            if (!isset($this->vars[$key])) {

                return null;

        }


            return $this->vars[$key];

        }


        function remove($var) 
        {

            unset($this->vars[$key]);

        }

        function getSetedRegisters()
        {
            echo '<pre>' ;
            var_dump ($this->vars) ;
            echo '</pre>' ;
        }



}
?>
